f1 = open('t1.txt', encoding='utf-8')
f2 = open('t2.txt', 'w', encoding='utf-8')
# for a in f1:
#     print(a.split(","))
content = f1.readlines()
ls =[]
for line in content:
    info = dict()
    line = line.split(',')
    info['id'] = line[0]
    info['name'] = line[1]
    info['age'] = line[2]
    info['phone'] = line[3]
    info['job'] = line[4].strip('\n')
    ls.append(info)
print(ls)
f2.write('[\n')
for l in ls :
    f2.write(str(l)+','+'\n')
f2.write(']')
f2.close()
